Focus state themeing

ABSTRACT

Focus state themeing is accomplished by separating the processing of the focus state from the processing of an operative state of a control element. The operative states of the control element are entered or exited based upon the detection of input from a user or the detection of control availability by the operating system or by an application running on the operating system. Once an operative state is determined for a control element, the focus state of the control element is detected and merged with the operative state to generate a theme state for the control element. The theme state is a combination of the operative state and the focus state. There is one combined theme state for each operative-focus combination. Various display configurations may be used to represent a control element with a combined operative-focus state. The control element is then rendered on a display based on the operative state theme and the focus state theme.

CROSS-REFERENCE TO RELATED APPLICATION

[0001] This application claims the benefit of U.S. ProvisionalApplication No. 60/196,004 filed Apr. 7, 2000 and entitled “Focus StateThemeing”. This application is also a continuation-in-part applicationof U.S. patent application Ser. No. 09/670791, filed Sep. 27, 2000 andentitled “Application Programming Interface For Changing The VisualStyle” which claims the benefit of U.S. Provisional Application No.60/195,593, filed Apr. 6, 2000.

TECHNICAL FIELD

[0002] The present invention relates to a computer system and, moreparticularly, to changing the theme of a focus state indicator forcontrol elements in a graphical user interface.

BACKGROUND OF THE INVENTION

[0003] Computer users in both the business and home environment havebecome accustomed to using a computer with a graphical operating system.For example, many users operate computers having a Microsoft Corporation“WINDOWS” operating system thereon. Certain components of thesegraphical operating systems are known as “controls.” For example, acontrol may be an “OK” button, which is generally a rectangular buttonwith “OK” written in it. By moving the cursor over the button andclicking on the mouse, a known operation will begin that is associatedwith the control. Many other controls exist, with examples includingscroll bars, dialog boxes and sliders. Beyond controls, the graphicaloperating systems also draw, or render, other graphical components asneeded on the display of the computer, such as the frame, the minimizebox and the close box.

[0004] There are two general kinds of controls in WINDOWS: standard andcustom. Standard controls are provided by the operating system. The codeto create, draw and operate standard controls is contained in the commoncontrol library (DLL), a part of WINDOWS. Custom controls are all othercontrols. Custom controls may be created by the manufacturer of theoperating system or by third parties. The code for custom controls iscontained in a corresponding separate library (DLL) or within anapplication.

[0005] Currently, when a graphical user interface component, such as acontrol, is used by an application, the application requests that aninstance of the component be created. Following this, the operatingsystem transmits a generic message to the component, instructing thecomponent to render itself. The application plays a role in routing themessage from the main window to the targeted control, but the controlcode performs the drawing. The application uses application programminginterfaces (API's) to create and interact with the control. An APIserves as a software interface to be used by other programs, much as thekeypad serves as an interface to a calculator. An API is a fundamentalconcept of high-level programming. In high-level programming, a programoften does not execute tasks by itself. Instead, the program asks someother program to execute these tasks. For example, programs frequentlydelegate various tasks to the underlying operating system. Continuingwith the above example, an application delegates the rendering of acontrol to the control's code.

[0006] In the prior art environment, when a generic rendering message isreceived by a control to draw itself, the control will draw itself usingits own drawing software code. In this prior art environment, thecontrol knows what it is supposed to look like, how it is supposed tobehave, and can effectuate such a display on the user interface of thecomputer. Thus, the application may delegate all aspects of visualrendering to the controls, avoiding the need to contain software code tosupport the visual rendering of the control within the host applicationitself.

[0007] By utilizing the standard controls defined and rendered by theoperating system, all controls will have the same appearance, regardlessof the application. Users of graphical operating systems can change onlya limited number of characteristics of the controls. In the “WINDOWS”operating system, a user can change the color scheme used to display thevarious controls and components on the monitor. The user can also selecta small set of fonts to be used by the controls and components. The usercan also specify a limited number of nonclient sizes that will controlthe sizing of the nonclient areas. Thus, the colors, fonts and a limitedset of sizes of the controls and components may be changed. However, thebasic appearance of the controls and components is dictated by therendering software code within the control library containing theparticular graphical component or control. In the prior art environment,to change the appearance of the controls or graphical components, therendering software code must be altered. For example, if it is desiredto change the appearance of the “OK” button, the rendering software codewithin the operating system DLL file containing the button control mustbe altered and the DLL file reconstructed at the binary level. If it wasdesired to render the button as an oval with “okay” written inside, thesoftware code would have to be changed accordingly. Such an approachmakes it difficult, if not impossible, for a computer user and forsoftware manufacturers, to easily alter the appearance of the controlsand graphical components.

[0008] In order to enhance the user experience of the computer, it wouldbe desirable for the user to have the ability to change the overall“look and feel” of the graphical display by changing the overall visualappearance or “theme” of the various graphical components. In otherwords, it would be desirable if the user could change not only the colorand font of the graphical components appearing on the monitor, but tochange the appearance of those graphical components as well. Forexample, it would be desirable to be able to alter and direct the layoutof the parts of a control, and to define the shape of a control or itsparts. It would also be desirable to control all aspects of how acontrol or its parts are drawn. Because the controls and graphicalcomponents existing within the DLL file in the prior art environment are“hard coded” with their own rendering software code, it is difficult andcumbersome to change the appearance of all of the controls andcomponents. To do so would require recoding each of the controls toachieve the desired appearance. If multiple visual styles were required,they would each have to be predefined and each “hard coded” into everycontrol. Moreover, the controls must also be recoded if a differentrendering technology is to be used. For example, if the controls arerendered using a bitmap and it is desired to utilize a vector-basedrenderer, each control must be altered.

[0009] Moreover, existing techniques do not provide an interface throughwhich software developers can design controls to accommodate versatilityin visual appearance. The prior art approaches do not involve anarchitecture that allows a control author the flexibility to design acontrol that is “theme aware.” Control authors are therefore not allowedthe freedom needed in authoring controls to create controls which caneasily be visually altered.

[0010] As a part of changing the theme for controls it is desirable toalso change the theme of focus state indicators associated withcontrols. Focus state indicators are used in keyboard access graphicaluser interfaces such as the user interface provided by the MicrosoftWindows operating system. However, these focus state indicators arecurrently apart of the image rendered for a given control. Therefore, tochange the theme of a focus state indicator for each control wouldrequire changing the rendering code for drawing each control.

SUMMARY OF THE INVENTION

[0011] In accordance with this invention, the above and other problemsare solved by separating the processing of the focus state from theprocessing of an operative state of a control element. The operativestates may be disabled, normal, hot and active. These states are enteredor exited based upon the detection of input from a user or the detectionof control availability by the operating system or by an applicationrunning on the operating system. Once an operative state is determinedfor a control element, the focus state of the control element isdetected and merged with the operative state to generate a theme statefor the control element. The theme state is a combination of theoperative state and the focus state. There is one combined theme statefor each operative-focus combination. Various display configurations maybe used to represent a control element with a combined operative-focusstate. The control element is then rendered on a display based on thetheme state.

[0012] In accordance with other aspects, the present invention relatesto a system for themeing a focus state indicator separate from anoperative theme for a control component in a graphical operating system.In the system an operative state module determines the operative stateof the control component. A focus state detector tests whether or notthe control component is in a focus state and indicates either focuscondition or a non-focus condition. A build combined state module inresponse to the focus condition merges the operative state and the focusstate into a combined state indicating the control component may berendered based on both a operative state theme and a focus state theme.

[0013] In accordance with another aspect of the invention, a userinterface with selectable focus indicators for control elements in agraphical user interface for a computing system is provided. Thecomputing system has a display and a keyboard, and a control element ina focus state is selectable with a keystroke on the keyboard. The userinterface comprises the following operations. An operative state themefor rendering the display of an operative state for a control element isreceived. A focus state theme for rendering the focus state of thecontrol element is also received. The control element is displayed in acombined operative-focus state. The rendering of the control element inthe combined state is based on the operative state theme and the focusstate theme. In this way control elements in the user interface haveselectable focus indicators.

[0014] In accordance with still other aspects, the present inventionrelates to a method of changing visual styles of a focus state indicatorin a control component in a graphical operating system running on acomputing system. The method begins by receiving the operative state ofthe control component, and detecting whether or not the controlcomponent is in a focus state. When the control component is not in afocus state, the method draws the control component using an operativestate theme. A combined state is created for the control component, whenthe control component is in a focus state. The combined state is asingle merged state representing the operative state and the focusstate. The method draws the control component in the combined stateusing the operative state theme and a focus state theme whereby thevisual style of a focus state indicator in the control component ischanged by the focus state theme.

[0015] The invention may be implemented as a computer process, acomputing system or as an article of manufacture such as a computerprogram product or computer readable media. The computer program productmay be a computer storage media readable by a computer system andencoding a computer program of instructions for executing a computerprocess. The computer program product may also be a propagated signal ona carrier readable by a computing system and encoding a computer programof instructions for executing a computer process.

[0016] Additional advantages and novel features of the invention will beset forth in part in a description which follows, and in part willbecome apparent to those skilled in the art upon examination of thefollowing, or may be learned by practice of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

[0017]FIG. 1 shows the operational flow for one embodiment of thepresent invention for focus state themeing where there are selectablethemes for the focus state of the control.

[0018]FIG. 2 is a schematic diagram illustrating one embodiment of anarchitecture used in changing visual styles of graphical components.

[0019]FIG. 3 is a representation of examples of graphical componentshaving different themed appearances.

[0020]FIG. 4 is a block diagram of a suitable computing systemenvironment for use in implementing the present invention.

[0021]FIG. 5 is a schematic diagram illustrating the architecture of atheme file.

[0022]FIG. 6 is a flow chart illustrating logical operations performedin rendering theme-aware components and non theme-aware components in agraphical operating system.

[0023]FIG. 7 is a state diagram illustrating operative states andconditions for moving between operative states of a control element.

[0024]FIG. 8 is a flow chart of logical operations illustrating thedetails of the build combined state module 16 of FIG. 1.

[0025]FIG. 9 is a representation of examples of graphical componentshaving different themed appearances with some components exhibiting afocus state.

DETAILED DESCRIPTION OF THE INVENTION

[0026]FIG. 1 illustrates the logical operations flow of one embodimentof the invention for rendering a control where there are selectablethemes for the focus state of the control. The logical operations of thevarious embodiments of the present invention are implemented (1) as asequence of computer implemented acts or program modules running on acomputing system and/or (2) as interconnected machine logic circuits orcircuit modules within the computing system. The implementation is amatter of choice dependent on the performance requirements of thecomputing system implementing the invention. Accordingly, the logicaloperations making up the embodiments of the present invention describedherein are referred to variously as operations, structural devices, actsor modules. It will be recognized by one skilled in the art that theseoperations, structural devices, acts and modules may be implemented insoftware, in firmware, in special purpose digital logic, and anycombination thereof without deviating from the spirit and scope of thepresent invention as recited within the claims attached hereto.

[0027] At the beginning of the operational flow in FIG. 1, operativestate module 10 as a part of the operating system generates an operativestate or control state for a user interface element that is to berendered or drawn on the display. The user interface elements havingcontrol states are typically control buttons, menu selections, icons,tabs or any control element that may be user selected by mouse or keystroke. In this description the user interface elements having controlstates are variously referred to as controls, control elements orcontrol buttons. The operative state module is receiving inputindicating availability or no availability for the control element andindicating user input relative to the control. The various operativestates for the control are disabled, normal, hot, and selected. Theoperation of module 10 will be described in more detail hereinafter withreference to the state diagram shown in FIG. 7.

[0028] Focus state detect operation 12 tests whether the control, forwhich the operative state has been determined by module 10, is also in afocus state. If the control is not in a focus state, then operation flowbranches from the focus state detection operation 12 to the drawoperative state operation 14 for the control. Draw operative stateoperation 14 receives the operative state theme data 15 and draws thecontrol in its operative state, i.e., disabled, normal, hot, orselected, in accordance with a selected theme for the operative state.

[0029] If the focus state detection operation 12 detects that thecontrol is also in focus state as well as the operative state, then theoperation flow branches YES to the build combined state module 16. Thebuild combined state module makes use of the operative state informationand the focus state information to build a combined or merged themestate that represents in effect a combination of operative and focus.For example, if the control operative state is normal, and the controlis also in a focus state, then module 16 will create a normal-focusmerged theme state. Draw combined state operation 18 receives theoperative state theme properties from operative state theme data 15 andalso receives the focus state theme properties from focus state themedata 19. These properties are used by the draw combined state operation18 to draw the control in the normal-focus state and render the normalcontrol in a focused state representation on the display. By separatingthe focus state out of the operative state for the control, it ispossible to apply different focus state themes to the control. Thus, thefocus state indicators for a control may be adjusted to various visualstyles. The draw operations 14 and 18 will be described in more detailhereinafter with reference to FIGS. 2 and 6.

[0030]FIG. 9 illustrates some display examples of a button in variousrendered states. There are different themes illustrated in the leftcolumn and right column and the name of the state illustrated in eachrow is at the right edge of the right column of buttons. In the theme inthe left column, there is not always a button display for every state.For example, the “mouse over” state has no separate rendered image fromthe normal state. Also, FIG. 9 illustrates a default state. The defaultstate indicates the control will react to the enter key on the keyboard.The darker border of the default control button in FIG. 9 tells the userthat the button is in a default state and pressing the enter key is thesame as pressing the button. The focus state condition is indicated inthe left column by dashed lines for the default focus state and themouse down focus state. In the right column, the focus state isindicated by an arrowhead in the upper left column of the button. Thedefault focus, the mouse over focus, and the mouse down focus buttonsall have a focus state indicator in the right column of buttons. Each ofthe buttons in the left and right columns represent a separate renderedbit map image. By dividing the focus state off from the operative stateand then combining the states logically to create a combined themestate, the visual style for the focus state may be changed withoutchanging the visual style for each of the operative states.

[0031] The architecture of the themeing system in one embodiment of thepresent invention is illustrated in FIG. 2. FIGS. 2 through 6 describein detail the operations and environment of the themeing system. If thereader is already familiar with the operations of the themeing systemdue to familiarity with the related patent application identified above,then it is suggested that the reader proceed to the description of FIGS.7 and 8 to understand embodiments of the present invention related tothemeing with the focus state.

[0032] In FIG. 2, operating system 134 is a graphical operating systemhaving graphically displayed controls and components associatedtherewith. In addition to controls discussed above, controls alsoinclude, but are not limited to, such things as scroll bars, pushbuttons and sliders. Other controls are within the scope of thisinvention, and are known to those of skill in the art. Graphicallydisplayed components include, but are in no way limited to, non-clientsections of the windows in the display, such as the frame surrounding anapplication display on the user interface, the minimize box, and theclose box.

[0033] In FIG. 2, the basic architecture used in this embodiment of thepresent invention is illustrated. The architecture is illustrated withexample applications 135 that are open and running on the computer 110.As an application 135 is running it often requires a control orgraphical component to be rendered, or displayed, on the monitor 191 ofthe computer 110.

[0034] In FIG. 2, libraries 208, 210 and 212 are linked to theapplications 135 through a fusion module 214. Fusion module 214 enablesthe themeing of controls in applications without needing to change theapplications themselves to request the themeable version of thecontrols. Fusion module 214 enables each application 135 to load thespecific version of the DLL 208, 210 or 212 at run time through the useof a manifest. The fusion manifest specifies the environment in which anapplication will run, which allows multiples versions of a DLL to existon one machine. Thus, fusion module 214 will map the request for acomponent so that it is rendered as a themeable element in DLL 212instead of a non-themeable element from DLL 208. This allows an existingapplication to be themed without changing code of the application.Fusion module 214 also allows the new themeable controls to be placed ina different DLL from the existing DLL, which simplifies implementationand minimizes compatibility risks.

[0035] An example display of graphical control components having avariety of appearances is seen in FIG. 3. As shown in FIG. 3, thecontrols may take the form of an OK button 200, a Cancel button 202 andan Apply button 204. The appearance of the controls and other componentsmay be visually changed to better suit the desire of the computer user.The appearance of the controls may be altered beyond color and fontselection. For example, the layout of the parts of a control can bedefined as desired. For example, a scroll bar could be rendered with theup and down arrow buttons adjacent to each other at the bottom of thescroll bar, instead of the up arrow and the top and the down arrow atthe bottom. Further, the shape of the control and its parts may bedefined. As shown in FIG. 3, four different overall appearances areshown for each of the buttons 200, 202 and 204. Each differentappearance setting is coordinated and is called a “theme.” Each theme isrepresented by one of the rows of buttons in FIG. 3. While only fourthemes are shown in FIG. 3, an unlimited variety of themes may becreated for selection by the computer user. The theme is a collection orset of appearance characteristics relating to a particular subject ordesired visual environment.

[0036] As an application 135 is running it often requires a control orgraphical component to be rendered, or displayed, on the monitor 191 ofthe computer 110. For example, with reference to FIG. 3, the display ofan OK button 200 may be needed by the application on the monitor.Application 135 requests that an instance of button 200 be created.Following this, the operating system transmits a generic message to thecontrol instructing it to draw itself. This request would be routed tothe dynamic link library (DLL) that contained the particular control. Asan example, the DLL in the WINDOWS operating environment would be calledUser32.dll or ComCtl32.dll(V5), shown as 208 and 210, respectively, inFIG. 2. Libraries 208 and 210 exist within graphical operating system134. Libraries 208 and 210 are linked through fusion module 214 withapplications 135. The defined control within libraries 208 and 210contains the drawing code needed to render the control on the monitor.Therefore, to change the appearance of controls in libraries 208, and210, the software drawing code must be changed for each control withinlibraries 208 and 210.

[0037] An additional library DLL, shown as 212 in FIG. 2 similar tolibrary 210, in that it contains a number of predefined controls andgraphical components that may be used by application 135. Broadly, DLL212 contains a number of components that are to be graphicallydisplayed. In library 212, however, the controls are defineddifferently, making them “theme aware.” Rather than containing all ofthe software code needed to render the control, the controls are definedwith certain basic information or values about the control, for example,the location, parts and states of the controls.

[0038] The location is the position on the user interface where thecontrol is desired. Parts are the different items that make up thecontrol. For example, OK button 200 has a background part and a textpart. As another example, a scrollbar control has an elongatedrectangular shaft part, a smaller thumb part that slides within theshaft part, and an arrow part at each end of the shaft part. The stateof a control describes the current appearance and functional state. Forexample, a button can be active, such as normal, hot, selected (pressed)or inactive, such as disabled or unavailable.

[0039] In the embodiment of the invention in FIG. 2, libraries 208, 210and 212 are linked to the applications 135 through a fusion module 214.Fusion module 214 enables the themeing of controls in applicationswithout needing to change the applications themselves to request thethemeable version of the controls. Fusion module 214 enables eachapplication 135 to load the specific version of the DLL 208, 210 or 212at run time through the use of a manifest. The fusion manifest specifiesthe environment in which an application will run, which allows multiplesversions of a DLL to exist on one machine. Thus, fusion module 214 willmap the request for OK button 200 so that it is rendered as a themeableelement in DLL 212 instead of a non-themeable element from DLL 208. Thisallows an existing application to be themed without changing code in theapplication. Fusion module 214 also allows the new themeable controls tobe placed in a different DLL from the existing DLL, which simplifiesimplementation and minimizes compatibility risks.

[0040] Controls existing within DLL 212 are therefore used if they areavailable. As seen above, the controls within DLL 212 are defined as aseries of parts and states. The controls within DLL 212 also contain thedrawing code needed to render the controls if no themes are selected, aswell as the theme-aware paths through the code. DLL 212 requestsrendering or drawing services from a theme manager DLL 216. Thememanager 216 provides the requested rendering services and draws thecontrol on the display at the indicated location, with the indicatedparts in the indicated states.

[0041] Theme manager 216 contains a series of APIs that allow library212 to interact and communicate with the theme manager. The APIs allow acontrol author to define a control within DLL 212 as a series of partsand states without the need for software rendering code. These APIs aregenerally divided into three types: drawing APIs 218, information APIs220 and utility APIs 222. Drawing APIs 218 are generally used to renderand assist in the layout of the needed control parts and othercomponents. Information APIs 220 are generally used to obtaininformation about the current defined appearance of the controls toallow controls to be individually customized. Utility APIs 222 are thoseAPIs used by parts of the operating system other than the controls, tocontrol theme selection. Utility APIs 222 include functions that can beused to enumerate an installed theme and load it.

[0042] Drawing APIs 218 are a collection of theme-aware drawingservices. Each individual API within the set of drawing APIs 218 is usedto perform a different drawing service. Generally, each API requires aspecified part and state of the graphical component at hand. An APIcalled “DrawThemeBackground” is provided that draws the theme-specifiedborder and fill for the specified part and state at the desiredlocation. Similarly, an API called “DrawThemeText” is provided thatdraws the specified text using the theme-specified color and font forthe specified part and state.

[0043]FIG. 4 illustrates an example of a suitable computing systemenvironment 100 on which the invention may be implemented. The computingsystem environment 100 is only one example of a suitable computingenvironment and is not intended to suggest any limitation as to thescope of use or functionality of the invention. Neither should thecomputing environment 100 be interpreted as having any dependency orrequirement relating to any one or combination of components illustratedin the exemplary operating environment 100.

[0044] The invention is operational with numerous other general purposeor special purpose computing system environments or configurations.Examples of well known computing systems, environments, and/orconfigurations that may be suitable for use with the invention include,but are not limited to, personal computers, server computers, hand-heldor laptop devices, multiprocessor systems, microprocessor-based systems,set top boxes, programmable consumer electronics, network PCs,minicomputers, mainframe computers, distributed computing environmentsthat include any of the above systems or devices, and the like.

[0045] The invention may be described in the general context ofcomputer-executable instructions, such as program modules, beingexecuted by a computer. Generally, program modules include routines,programs, objects, components, data structures, etc. that performparticular tasks or implement particular abstract data types. Theinvention may also be practiced in distributed computing environmentswhere tasks are performed by remote processing devices that are linkedthrough a communications network. In a distributed computingenvironment, program modules may be located in both local and remotecomputer storage media including memory storage devices.

[0046] With reference to FIG. 4, an exemplary system for implementingthe invention includes a general purpose computing device in the form ofa computer 110. Components of computer 110 may include, but are notlimited to, a processing unit 120, a system memory 130, and a system bus121 that couples various system components including the system memoryto the processing unit 120. The system bus 121 may be any of severaltypes of bus structures including a memory bus or memory controller, aperipheral bus, and a local bus using any of a variety of busarchitectures. By way of example, and not limitation, such architecturesinclude Industry Standard Architecture (ISA) bus, Micro ChannelArchitecture (MCA) bus, Enhanced ISA (EISA) bus, Video ElectronicsStandards Association (VESA) local bus, and Peripheral ComponentInterconnect (PCI) bus also known as Mezzanine bus.

[0047] Computer 110 typically includes a variety of computer readablemedia. Computer readable media can be any available media that can beaccessed by computer 110 and includes both volatile and nonvolatilemedia, removable and non-removable media. By way of example, and notlimitation, computer readable media may comprise computer storage mediaand communication media. Computer storage media includes both volatileand nonvolatile, removable and non-removable media implemented in anymethod or technology for storage of information such as computerreadable instructions, data structures, program modules or other data.Computer storage media includes, but is not limited to, RAM, ROM,EEPROM, flash memory or other memory technology, CD-ROM, digitalversatile disks (DVD) or other optical disk storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can accessed by computer 110. Communication media typicallyembodies computer readable instructions, data structures, programmodules or other data in a modulated data signal such as a carrier waveor other transport mechanism and includes any information deliverymedia. The term “modulated data signal” means a signal that has one ormore of its characteristics set or changed in such a manner as to encodeinformation in the signal. By way of example, and not limitation,communication media includes wired media such as a wired network ordirect-wired connection, and wireless media such as acoustic, RF,infrared and other wireless media. Combinations of any of the aboveshould also be included within the scope of computer readable media.

[0048] The system memory 130 includes computer storage media in the formof volatile and/or nonvolatile memory such as read only memory (ROM) 131and random access memory (RAM) 132. A basic input/output system 133(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 110, such as during start-up, istypically stored in ROM 131. RAM 132 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 120. By way of example, and notlimitation, FIG. 4 illustrates operating system 134, applicationprograms 135, other program modules 136, and program data 137.

[0049] The computer 110 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 4 illustrates a hard disk drive 140 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 151that reads from or writes to a removable, nonvolatile magnetic disk 152,and an optical disk drive 155 that reads from or writes to a removable,nonvolatile optical disk 156 such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment include,but are not limited to, magnetic tape cassettes, flash memory cards,digital versatile disks, digital video tape, solid state RAM, solidstate ROM, and the like. The hard disk drive 141 is typically connectedto the system bus 121 through an non-removable memory interface such asinterface 140, and magnetic disk drive 151 and optical disk drive 155are typically connected to the system bus 121 by a removable memoryinterface, such as interface 150.

[0050] The drives and their associated computer storage media discussedabove and illustrated in FIG. 4, provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 110. In FIG. 4, for example, hard disk drive 141 is illustratedas storing operating system 144, application programs 145, other programmodules 146, and program data 147. Note that these components can eitherbe the same as or different from operating system 134, applicationprograms 135, other program modules 136, and program data 137. Operatingsystem 144, application programs 145, other program modules 146, andprogram data 147 are given different numbers here to illustrate that, ata minimum, they are different copies. A user may enter commands andinformation into the computer 110 through input devices such as akeyboard 162 and pointing device 161, commonly referred to as a mouse,trackball or touch pad. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit120 through a user input interface 160 that is coupled to the systembus, but may be connected by other interface and bus structures, such asa parallel port, game port or a universal serial bus (USB). A monitor191 or other type of display device is also connected to the system bus121 via an interface, such as a video interface 190. In addition to themonitor, computers may also include other peripheral output devices suchas speakers 197 and printer 196, which may be connected through a outputperipheral interface 195.

[0051] The computer 110 may operate in a networked environment usinglogical connections to one or more remote computers, such as a remotecomputer 180. The remote computer 180 may be a personal computer, aserver, a router, a network PC, a peer device or other common networknode, and typically includes many or all of the elements described aboverelative to the computer 110, although only a memory storage device 181has been illustrated in FIG. 4. The logical connections depicted in FIG.4 include a local area network (LAN) 171 and a wide area network (WAN)173, but may also include other networks. Such networking environmentsare commonplace in offices, enterprise-wide computer networks, intranetsand the Internet.

[0052] When used in a LAN networking environment, the computer 110 isconnected to the LAN 171 through a network interface or adapter 170.When used in a WAN networking environment, the computer 110 typicallyincludes a modem 172 or other means for establishing communications overthe WAN 173, such as the Internet. The modem 172, which may be internalor external, may be connected to the system bus 121 via the user inputinterface 160, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the computer 110, orportions thereof, may be stored in the remote memory storage device. Byway of example, and not limitation, FIG. 4 illustrates remoteapplication programs 185 as residing on memory device 181. It will beappreciated that the network connections shown are exemplary and othermeans of establishing a communications link between the computers may beused.

[0053] Although many other internal components of the computer 110 arenot shown, those of ordinary skill in the art will appreciate that suchcomponents and the interconnection are well known. Accordingly,additional details concerning the internal construction of the computer110 need not be disclosed in connection with the present invention.

[0054] Those skilled in the art will understand that program modulessuch as the operating system 134, application programs 135 and data 137are provided to the computer 110 via one of its memory storage devices,which may include ROM 131, RAM 132, hard disk drive 141, magnetic diskdrive 151 or optical disk drive 155. Preferably, the hard disk drive 141is used to store data 137 and programs, including the operating system134 and application programs 135.

[0055] When the computer 110 is turned on or reset, the BIOS 133, whichis stored in the ROM 131 instructs the processing unit 120 to load theoperating system from the hard disk drive 141 into the RAM 132. Once theoperating system 144 is loaded in RAM 132, the processing unit 120executes the operating system code and causes the visual elementsassociated with the user interface of the operating system 134 to bedisplayed on the monitor 191. When an application program 135 is openedby a user, the program code and relevant data are read from the harddisk drive 141 and stored in RAM 192.

[0056] Returning now to the system architecture in FIG. 2 and theexample buttons in FIG. 3, if an OK button 200 (FIG. 3) was requested byan application 135, the control within DLL 212 would pass the part,state and location information to drawing APIs 218 through a functioncall, such as DrawThemeBackground, or DrawThemeText. As is more fullydescribed below, this part and state information is matched withappearance characteristics and theme manager 216 draws the control onthe monitor. Drawing APIs 218 further include an API called“GetThemeBackgroundContentRect.” This API allows the control to obtainthe size of the content for the theme-defined background. Usually, thisis the area inside the borders or margins. By using this API a controlcan determine the available area within the background in which itemsmay be placed. When using this API, the control within DLL 212 isrequesting information regarding a graphical component with a specifiedpart and state. This information is obtained by the theme manager 216and returned to the control. A similar API called“GetThemeBackgroundExtent” is provided that calculates the size andlocation of the theme-specified background for the specified part andstate given a content rectangle. This API may be used when the contentis known, and based upon that content, the outer boundary for the themebackground needs to be determined. Another API called “GetThemePartSize”is provided to retrieve the theme author specified minimum and normalsizes of a control part.

[0057] Drawing APIs 218 further include an API entitled“GetThemeTextExtent.” This API is used to calculate the size of aspecified text when rendered in the theme font. This API can thereforebe used to determine the width and height of a given text string. Thecontrol author can thus specify a part and state having text associatedtherewith and use this API to obtain information from theme manager 216regarding the size of the text string. Similarly, another API entitled“GetThemeTextMetrics” is available that can be used to obtain sizeinformation about the font being used. Therefore, this API may be usedto obtain information such as the width of an average font character. Inother words, this API is used to obtain from theme manager 216information that the control needs regarding the size of atheme-specified font.

[0058] An API entitled “GetThemeBackgroundRegion” is also providedwithin drawing APIs 218. Within some operating systems, a region is away to describe a non-rectangular shape. A region can also be thought ofas an image with transparent parts. This API is used to compute theregion for a regular or partially transparent theme-specifiedbackground. In other words, this API may be used to determine what istransparent and what is opaque within the framed background for aspecified part and state. Thus, this API supports the definition ofnon-rectangular shapes of controls and parts. Similarly, an API entitled“HitTestThemeBackground” is provided. This API is used to determinewhether the point within the background for the specified part beingclicked is in a transparent or an opaque area. This API is used by acontrol within DLL 212 to obtain information from the theme manager 216.If the click is within a transparent area, no action may be needed.Conversely if the click is within an opaque area, an action may berequired.

[0059] Another API contained within drawing APIs 218 is entitled“DrawThemeLine.” This API allows a theme to define a generic style of aline. This generic style may be accessed and used for a specified partby calling the “DrawThemeLine” API. Similarly, an API entitled“DrawThemeBorder” is provided that allows a theme-defined border to bespecified. The theme-border may be drawn for a specified part utilizingthis API.

[0060] An API entitled “DrawThemeIcon” is provided that allows atheme-defined icon to be rendered that may include theme-specifiedspecial effects. For example, a theme-icon may have a differentappearance when the mouse is directly over the icon, such as a glowingappearance.

[0061] Drawing APIs 218 also contain an API entitled“IsThemePartDefined” that may be used to determine if the theme hasdefined parameters for the specified part and state. If the part is notdefined within the theme the control can draw this part itself. If thepart is theme defined, theme manager 216 will render the part accordingto the theme defined information. Another API is provided entitled“IsThemeBackgroundPartiallyTransparent.” This API is used to determinewhether or not the background is a rectangle or region that has atransparent part. This API may be used to simplify the control code. Ifthere is no transparency within the background, then there is no need toconduct any hit testing through the use of the “HitTestThemeBackground”API.

[0062] Importantly, drawing APIs 218 further include an API entitled“OpenThemeData.” This API is used to obtain the handle for a list ofclass names. A class name list identifies a set of graphical components,and may be divided into parent class names and one or more child classnames. For examiner, a parent class name might be button. A child classname for that parent class might be “start button.” A handle is areference to an internal structure detailing various information andproperties of the object. Theme manager 216 will search for each classname in the list and use the first matching theme information found. Forexample, if the class names included both start button and button, thestart button theme information would be used if it existed. If startbutton theme information did not exist, the theme information for abutton would be used. If no value is found the old code will be used torender the control. If any non-0 value is returned, a valid theme handleis established. This theme handle will be returned to DLL 212 and usedfor all of the theme drawings.

[0063] Similarly, another API provided is entitled “CloseThemeData.”This API is used when the control is closed, such as a button no longerbeing needed, or when the theme is changed, as is more fully describedbelow.

[0064] Another API provided is entitled “IsThemeActive.” This API allowsa control within DLL 212 to obtain a true or false answer as to whetherthere is a current theme in effect. This API can thus be used todetermine whether to call the “OpenThemeData” API or merely use theexisting drawing code where the controls will render themselves.

[0065] As described above, theme manager 216 also contains a set ofinformation APIs 220. These information APIs 220 allow controls to beindividually customized. In other words, these APIs are utilized in onlycertain instances and may be used to obtain information about specificcontrols. These information APIs are used to query theme manager 216 fordefined theme information regarding specified properties of the theme.Each API 220 thus requests information, which is provided by thememanager 216.

[0066] Within information APIs 220 is an API entitled “GetThemeColor.”This API utilizes the specified part and specified state along with aspecified color property identifier to obtain information about thetheme color. The property identifier is the color property number thatis desired. In other words, the color API is used to ask for the colorvalue corresponding to the property desired, such as the backgroundcolor. Another API called “GetThemeMetric” is provided that requests andreceives a size value for a specified property identifier. This sizevalue will be an integer. An API entitled “GetThemeString” is alsoprovided within information APIs 220. This API is used to obtain thestring for a specified property identifier. The string will includeinformation regarding the number of characters in the string and wherethe string is terminated.

[0067] Another API is provided within information APIs 220 entitled“GetThemeBool” that will return an integer that is either 0 or 1 for agiven part, state and property. The 0 and 1 correspond to a false ortrue state for that part, state and property. Another API provided isentitled “GetThemeInt.” That will return an integer value for aspecified part, in a specified state with a specified propertyidentifier. Similarly, an API is provided entitled “GetThemeEnumValue”that will return the theme-enum for the specified part, state andproperty identifiers. An enum is merely a variable that holds numericvalues which correspond to symbolic information. For example, an enumfor alignment might be left, middle, right corresponding to the numbers0, 1, 2.

[0068] Another API entitled “GetThemePosition” is provided that willreturn two integer values, corresponding to an x-location and ay-location for a specified part in a specified state with a specifiedproperty identifier. Another API provided within information APIs 220 isentitled “GetThemeFont.” This API is used to obtain a logicaldescription of the font theme used, given a specified part, state andproperty identifier.

[0069] Yet another API provided within information APIs 220 is entitled“GetThemeRect.” This API will return four integers representing theleft, right, top and bottom of the specified part, state and propertyidentifier. Similarly, an API entitled “GetThemeMargins” is providedthat will return four integers representing a left space, right space,top space and bottom space given a specified part, state and propertyidentified. There is also an API entitled “GetThemeIntList” whichreturns the value of a specified property whose type is a list ofinteger values. Finally, an information API entitled “GetPropertyOrigin”is provided that returns the location from which the propertyoriginated. This API allows the control author to obtain information forthe property origin. In other words, the API allows the control authorto determine whether the property was specified on the state, part,class, global or was the property not found. This is needed becausetheme properties are specified by the theme author in a hierarchicalfashion. For example, if a property is not specified at the “state”level, the theme manager will search the “part” level, “class” level,and finally the “globals” level for the property. Sometimes it isimportant for the control to know if a property was explicitly definedfor the part/state it is processing. There is also an API entitled“GetThemeFilename” which returns the string value of the specifiedfilename property.

[0070] Another API provided within information APIs 220 is entitled“SetWindowTheme.” This API allows a control author to redirect a controlwindow to use a different set of theme information than its class wouldnormally use. In other words, this API allows a control to be used whilegiving the control a special look other than the standard look definedby the theme for that class. This API may use additional parameters toidentify a particular application and class name. This allows a themeauthor to use the specified class but to change the appearance of thatclass. For example, a button may be defined that has a given buttonappearance. Utilizing this API, this button can be redirected to adifferent class name. For example, “OkayButton” may be specified. Thetheme author will then be able to use a class called “OkayButton” andthe “OkayButton” will have a different appearance from the standardbutton appearance.

[0071] There is also a subset of theme metrics APIs within theinformation API group that parallel the WINDOWS system metrics, butwhich are specific to a theme. Unlike normal control-based properties,these properties are available to and shared by all controls.“GetThemeSysColor” returns the theme-specified color value of thespecified system color index. “GetThemeSysColorBrush” returns a handleto a drawing brush that is the color of the specified system colorindex. “GetThemeSysSize” returns the integer size of the specified themesize index. “GetThemeSysBool” returns a boolean (0 or 1) value for thespecified theme boolean index. “GetThemeSysFont” returns a logical fontstructure for the specified theme font index. “GetThemeSysString”returns a string value of the specified theme string index.

[0072] There are also some application-oriented API's within theinformation API group 220. “IsAppThemed” returns a boolean (0 or 1)value indicating if the application is being themed by the operatingsystem. “GetWindowTheme” returns the most recent theme handle, if any,opened for the specified window. “GetThemeAppProperties” returns theflags that control which parts and types of windows are themeable withinthe application. “SetThemeAppProperties” allows the application to setthese same flags.

[0073] Finally, there are information API's 220 for error handling.“GetThemeLastErrorContext” returns the error context (including errorcode, error code parameters, filename and source line) associated withthe last reported theme error on the current thread of execution.“FormatThemeMessage” returns the error string for the specified errorcontext in the specified language.

[0074] Theme manager 216 includes not only drawing APIs 218 andinformation APIs 220, but also a set of utility APIs 222. These APIs maybe used to achieve a variety of results.

[0075] Drawing APIs 218 and information APIs 220 allow the author orcreator of controls within DLL 212 to define the controls as a series ofparts and states. The defined control is therefore abstracted from therendering process of theme manager 216 and is also abstracted from thetheme-defined appearance information or characteristics, as is morefully described below. Using APIs 218 and 220 the control author cancreate controls that are “theme-aware” and that are equipped tocommunicate with theme manager 216. This communication involves passingbasic information or values to theme manager 216 that allow the thememanager to render the desired control, having the needed parts in thedesired states.

[0076] Theme manager 216 also contains the renderers needed to executethe drawing instructions. For example, a border-fill renderer 221 couldbe used that allows different color themes to be applied to thecontrols. As another example, a bitmap renderer 223 could be used thatdefines the control parts as images. Other examples of renderers includeusing a vector definition language, portable network graphics (PNG)files, or portable document format files (PDF). It should be understoodthat the present invention is not limited to a particular renderingtechnology. If a different renderer is desired or needed, the drawingcode of theme manager 216 is revised to add the renderer to thememanager 216. The controls within DLL 212 are therefore isolated orabstracted from the rendering technology within theme manager 216. Thisallows different renderers to be added to theme manager 216 withouthaving to revise the controls within DLL 212, as is more fully explainedbelow.

[0077] The renderer within theme manager 216 renders the requestedcontrol according to an appearance theme that has been selected by theuser of the computer. For example, appearance themes 224 and 226 areshown in FIG. 2. As shown, theme 224 may be a consumer theme and theme226 may be a business theme. It should be understood, however, thatother themes could be used and that the invention is in no way limitedto the particular theme. For example, other themes could include acartoon theme, a children's theme or a golf theme. As seen in FIG. 2,business theme 226 has been selected by the user, as represented by thesolid line 228. Consumer theme 224 is available for selection, asrepresented by the broken line 230.

[0078] Each theme 224 and 226 has similar architecture. As seen in FIG.5, business theme 226 includes a series of image files 232. Image files232 are the image files that will be used by the particular theme. Inthis case, image files 232 are the image files that will be used bybusiness theme 226. Business theme 226 also includes a themes.ini file234. File 234 is a text file and can be created in either ANSI orUNICODE character sets. File 234 specifies the available color schemesand sizes available for the theme. In the case of theme 226, file 234specifies the available color schemes and sizes available for businesstheme 226. File 234 therefore represents all of the variations of thetheme to which it applies.

[0079] Theme file 234 consists of one or more sections. The sectionswithin theme file 234 include a documentation section 236, a sizesection 238, a color scheme section 240 and a file section 242.Documentation section 236 is optional and may contain any property name.Size section 238 specifies the size name, such as “default size,” “verysmall” or “very large.” Color scheme section 240 is used to specify asimple color scheme name and an optional color scheme transformationassociated with the color scheme name. File section 242 is used tospecify a unique name for the class data file. The file section 242 willinclude a file name, a color scheme (from color scheme section 240) forthat file name, and the sizes (from the size section 238) that the filewill support.

[0080] Theme 226 includes a second .ini file labeled 244 in FIG. 3. File244 is a class data file that contains the theme data for a specificsize and color theme. File 244 may also contain defining sections. Forexample, file 244 may contain a globals section that defines theproperties of the particular class of control. File 244 may also containa section that allows the system metrics to be obtained and used.Finally, file 244 may contain a group of class sections. Each classsection name contains a class name, an optional part name, and anoptional state name. Within the section are the property/value pairsthat define the appearance of the specified part or control. Forexample, a class name would be “slider” for the slider control. A partspecified for the slider would be “track.” States defined for the trackpart would be “normal,” “disabled,” and “hot.” The class section namecan also include an application (or “group”) name, which specifies thatthe section only applies to a specific application (or “group” name, asspecified by the SetWindowTheme API).

[0081] Image files 232, theme file 234, including file 244 are broadlygrouped together to make up theme directory 246. Theme directory 246 anda system schema file located within the theme manager 216 are used toload business theme 226. The system schema file is the file that definesproperty numbers for all of the properties involved in a particulartheme and is basically a master definition file that allows the themedproperties to be assigned a number corresponding to a definedappearance.

[0082] Theme directory 246 thus contains a theme.ini file 234, a classdata file 244 and all of the image files 232 used by the theme. Thecontents of theme directory 246 can be packaged into a DLL file bypackthem tool 250. Packthem tool 250 processes the theme.ini file byparsing it against the schema file for syntax errors and adding the .inifile to the package being built. Recognized properties fromdocumentation section 236 are written to a package string table. Colorscheme information from color scheme section 240 and size informationfrom size section 238 is also written to a package string table. Eachclass data file 244 is also processed. As the class data file isprocessed, the file is parsed against the schema file for syntax errors.The class data file is also added to the package being built.

[0083] The DLL file produced by packthem tool 250 is business theme file226. File 226 contains the theme data and this theme data is isolatedfrom control library 212. This allows different themes to be created andselected without changing the controls defined within library 212. Thus,control authors can create and define controls independently of theappearance or theme data. File 226 is in binary format and is passedinto a shared theme data file 252 when business theme 226 is selected bythe computer user, as best seen in FIG. 2. File 252 is a shared memorymap file that can be accessed by all processes. Thus, when a theme isselected by the computer user, theme manager 216 will read theinformation for a defined theme file, such as file 226, and will placethat information in a binary format in file 252 where all runningprocesses have access to the binary information.

[0084] As best seen in FIG. 2, a theme-switching control panel 254 isprovided that is in communication with theme manager 216. Panel 254cooperates with a user interface that displays the available themes fromwhich the user can select. As shown in FIG. 2, control panel 254 wouldallow a user to select business theme 226 or consumer theme 224. If, ashas been discussed above, business theme 226 is selected and the user ofthe computer switches to select consumer theme 224, theme 224 will beloaded into shared memory map file 252 as binary data. Theme manager 216also sends a message to each theme-aware control within DLL file 212that the theme has changed. Each theme-aware control knows how torespond to this message.

[0085] When the theme-aware control receives a message that the themehas changed, the control will close the current theme handle that wasreceived via the OpenThemeData API. The control will then attempt toopen a new theme handle, again using the OpenThemeData API. If a newtheme handle cannot be opened, the control knows that the theme has beenswitched off for that control and that the old drawing code is to beused by the control to draw itself. If a new theme handle is opened,theme manager 216 will look at the theme binary data and will start anew drawing routine so that all of the theme-aware controls are redrawnutilizing the newly selected theme, such as consumer theme 224. Anyinformation that was cached regarding the previously selected theme isinvalidated and that information must be recalculated.

[0086] In operation, as is best seen in FIG. 6, an application 135 willrequest a graphic, such as a control, to be rendered on the userinterface, as represented at 256. This graphical request is routedthrough fusion 214. As represented by 258, the fusion process willdetermine if the requested control is a theme-aware control. If thecontrol requested is not theme-aware, the old code is used and thecontrol will draw itself using a control from DLL 208 or 210, asrepresented by 260 in FIG. 6. If the control is theme aware, thegraphical request is processed in DLL 212, as is represented by 262. Thecontrols within DLL 212 will pass basic information for the graphicalrequest, such as the part, state and location for the requested controlto the theme manager 216 in a request for rendering services, using APIs218, 220 and 222. Thus, the graphical request is processed in DLL 212without application of the appearance characteristics that are found bytheme manager 216. Theme manager 216 will then determine or apply thetheme-specific appearance characteristics for the given control part andstate, as shown by 264. This appearance data is retrieved from theshared memory map data file 252. Using the retrieved appearance data,for the requested control part and state, along with the location, thetheme manager will render the control on the display of the computer, asrepresented by 266.

[0087] Referring now to FIG. 7, one embodiment of operations of theoperative state module 10 (FIG. 1) are illustrated by a state diagram. Acontrol element may be in four possible states, disabled, normal, hot,or selected. These operative states for the control are set by theoperating system or by the application in working with the operatingsystem if the control is in an application. If the control is in anormal operative state 70, this indicates that the operation representedby the control is available. If the operating system or the applicationindicates the operation represented by the control is not available,then a control not available condition switches the operative state tothe disabled state 72. When the operating system or the applicationworking with the operating system determines the operation is available,then the control is available and the state of the control returns tonormal state 70. If the cursor is positioned over the control indicatinga “mouse over” condition, then the state switches from normal to hotstate 74. In the hot state 74, a click or “mouse down” condition wouldchange the control state from hot to selected state 76. A release of themouse button indicating a “mouse up” condition would return the controlstate to the hot state 74. Likewise, when the mouse is moved so that thecursor is outside the control element on the display, then the “mouseoutside” condition causes the hot state to revert to a normal state forthe control. Thus, in this embodiment of the invention an operatingsystem or an application by monitoring the mouse or cursor conditionsand the control availability will generate the operative state for useby the rendering operations in drawing the control on the display.

[0088] In another embodiment (not illustrated) of the operative statemodule 10 (FIG. 1), movement between operative states of a control isaccomplished with key strokes. For example, if the control buttons arein an unfocused available state such as normal or hot, the tab key maybe successively pressed to move the focus state successively through thecontrol buttons. When a control button enters a focused state, it maythen be selected by pressing the space key. Accordingly in thisembodiment an operating system or an application monitors the state ofthe controls and the movement between controls by activation or pressingof the tab key. It will be appreciated that there are many ways in whichthe operative state module could be implemented to provide the operativestate information used by other logical operations in FIG. 1.

[0089]FIG. 8 illustrates the operations performed by the build or createtheme state module 16 in FIG. 1. When the operating system has detectedthat a focus state condition exists for the control as discussed withreference to FIG. 1, then the operation flow connects through connector88 to receiving operation 90. The build theme state module begins withreceiving operation 90 receiving the focus state theme indication. Statedetectors 91, 92, and 93 then test what the operative state of thecontrol is. While FIG. 8 represents that detector 91 tests for thenormal state, detector 92 detects the hot state, and detector 93 looksthe disabled state, the sequence of detections is not important. Allthat matters is that when a given state is detected, the operationappropriate to that state is then taken.

[0090] If the operative state is normal, the operational flow branchesYES from normal state detector 91 to set theme state 94 operation. Settheme state operation 94 sets the theme state to the normal-focus state.Thereafter, the operation flow returns to operation 18 in FIG. 1 throughflow connector 86 to draw the control in the theme state. Draw operation18 retrieves the properties for the normal-focus theme state inrendering the control.

[0091] Similarly, if hot state detector 92 detects that the operativestate was the hot state, operation flow branches YES to set theme stateoperation 95. Operation 95 sets the theme state to the hot-focus state.The operation flow returns to draw operation 18 in FIG. 1 whichretrieves the hot focus properties and draws the control in the hotfocus state.

[0092] Disabled state detector 93 detects whether the control is activeor inactive. If a focus state has been identified for an inactivecontrol, such as disabled or unavailable, this represents an error sincea disabled control would not be properly in a focused state. Therefore,the operation flow branches YES from the disabled state detector to anerror handling routine 96. When the error handling operations arecomplete, the return operation 98 returns the operational flow to themain operating system flow rather than to the draw operation 18 inFIG. 1. Alternatively, this active or inactive operative state detectoperation 93 could be performed along with focus state detect operation12 in FIG. 1. If operation 93 is performed in this manner, it need notbe performed in FIG. 8.

[0093] Alternative embodiments of the present invention will becomeapparent to those skilled in the art to which it pertains upon review ofthe specification, including the drawing figures. Accordingly, the scopeof the present invention is defined by the appended claims rather thanthe foregoing description.

We claim:
 1. A method for displaying a focus state of a user interfaceelement in a graphical user interface of a computing system, the methodcomprising: testing whether a control state of a user interface elementis disabled or active; if the control state is active, detecting if theuser interface element is in a focus state; if the user interfaceelement is in an active control state and in a focus state, building amerged state indicating the user interface element is active and in afocus state; and rendering based on the merged state a display of theuser interface element in an active state with a focus state indicator.2. The method of claim 1 wherein the control state is normal and the actof building builds a merged normal-focus state as a single state.
 3. Themethod of claim 2 wherein the act of rendering comprises: receivingtheme data for the normal state and theme data for the focus state;drawing the user interface element on a display based on the theme datafor the normal state and drawing the focus indicator on the userinterface element based on the theme data for the focus state.
 4. Themethod of claim 1 wherein the control state is hot and the act ofbuilding builds a merged hot-focus state as a single state.
 5. Themethod of claim 4 wherein the act of rendering comprises: receivingtheme data for the hot state and theme data for the focus state; drawingthe user interface element on a display based on the theme data for thehot state and drawing the focus indicator on the user interface elementbased on the theme data for the focus state.
 6. The method of claim 1wherein the control state may be disabled, normal, hot or selecteddepending upon the availability of the user interface element and theinput from the user and the active states having a possible focus stateare normal and hot.
 7. A computer program product readable by acomputing system and encoding a computer program of instructions forexecuting a computer process for displaying a themed focus state of acontrol element in a graphical user interface of a computing system,said computer process comprising: receiving a control state for thecontrol element; detecting if the control element is in a focus state;if the control element is in a focus state, building a combined stateindicating the control state and focus state of the control element; andrendering the control element based on the combined state so that thecontrol element is displayed with a themed focus state.
 8. The computerprogram product of claim 7 wherein the computer process furthercomprises: detecting whether the control state of control element isdisabled or active; and if the control element is disabled, renderingthe control element based on a theme for the control state.
 9. Thecomputer program product of claim 7 wherein the control state has acontrol state theme and the focus state has a focus state theme and theact of rendering comprises: retrieving the control state theme and thefocus state theme; drawing the control element based on the controlstate theme and the focus state theme so that the control element in afocus state is displayed with a focus state theme.
 10. The computerprogram product of claim 7 wherein only control states, where thecontrol is available and has not been selected, may also have a focusstate.
 11. A method for changing visual styles of a focus stateindicator in a control element in a graphical operating system runningon a computing system, said method comprising: receiving the operativestate of the control element; detecting whether or not the controlelement is in a focus state; drawing the control element using anoperative state theme when said act of detecting detects the controlelement is not in a focus state; creating a combined state for thecontrol element, when said act of detecting detects the control elementis in a focus state, the combined state being a single merged staterepresenting the operative state and the focus state; and drawing thecontrol element in the combined state using the operative state themeand a focus state theme, whereby the visual style of a focus stateindicator in the control element is changed by the focus state theme.12. The method of claim 11 wherein the act of creating the combinedstate comprises: receiving a focus state for the control element;testing whether the operative state of the control element is normal;and if the operative state is normal, setting the combined state to ahot-focus state.
 13. The method of claim 12 wherein the act of drawingthe control element in a combined state comprises: retrieving the normalstate theme properties; retrieving the focus state theme properties;rendering the control element with both the normal state themeproperties and the focus state theme properties.
 14. The method of claim11 wherein the act of creating the combined state comprises: receiving afocus state for the control element; testing whether the operative stateof the control element is hot; and if the operative state is hot,setting the combined state to a hot-focus state.
 15. The method of claim14 wherein the act of drawing the control element in a combined statecomprises: retrieving the hot state theme properties; retrieving thefocus state theme properties; rendering the control element with boththe hot state theme properties and the focus state theme properties. 16.The method of claim 11 the act of creating the combined state comprises:receiving a focus state for the control element; testing whether theoperative state of the control element is disabled; and if the operativestate is disabled, performing an error handling process.
 17. A systemfor themeing a focus state indicator separate from an operative themefor a control element in a graphical operating system said systemcomprising: an operative state module determining the operative state ofthe control element; a focus state detector testing whether the controlelement is in a focus state and indicates focus condition or a non-focuscondition; a build combined state module in response to the focuscondition merging the operative state and the focus state into acombined state indicating the control element may be rendered based onboth a operative state theme and a focus state theme.
 18. The system ofclaim 17 further comprising: a draw combined state module drawing thecontrol element with operative state theme properties and a focus stateindication with focus state theme properties.
 19. The system of claim 17further comprising: a draw operative state module in response to thenon-focus condition drawing the control element with operative statetheme properties.
 20. A user interface with selectable focus indicatorsfor control elements in a graphical user interface for a computingsystem, the user interface comprising: receiving a operative state themefor rendering a display of an operative state for a control element;receiving a focus state theme for rendering the focus state of thecontrol element; and displaying the control element in a combinedoperative-focus state, the rendering of the control element in thecombined state being based on the operative state theme and the focusstate theme whereby control elements in the user interface haveselectable focus indicators.